package org.springframework.data.mybatis.repository.config;

import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.core.annotation.AnnotationAttributes;
import org.springframework.core.env.Environment;
import org.springframework.core.io.ResourceLoader;
import org.springframework.core.type.AnnotationMetadata;
import org.springframework.data.repository.config.AnnotationRepositoryConfigurationSource;

import java.lang.annotation.Annotation;

public class MybatisAnnotationRepositoryConfigurationSource extends AnnotationRepositoryConfigurationSource {
	
    public MybatisAnnotationRepositoryConfigurationSource(AnnotationMetadata metadata, Class<? extends Annotation> annotation, ResourceLoader resourceLoader, Environment environment, BeanDefinitionRegistry registry) {
		super(metadata, annotation, resourceLoader, environment, registry);
	}

    public String[] getMapperLocations() {
        AnnotationAttributes attributes = getAttributes();
        return attributes.getStringArray("mapperLocations");
    }

}
